import 'package:library_base/entities/generated/json/base/json_convert_content.dart';
import 'package:library_base/entities/login_bean_entity.dart';

LoginBeanEntity $LoginBeanEntityFromJson(Map<String, dynamic> json) {
  final LoginBeanEntity loginBeanEntity = LoginBeanEntity();
  final int? userId = jsonConvert.convert<int>(json['userId']);
  if (userId != null) {
    loginBeanEntity.userId = userId;
  }
  final String? accessToken = jsonConvert.convert<String>(json['accessToken']);
  if (accessToken != null) {
    loginBeanEntity.accessToken = accessToken;
  }
  final String? refreshToken = jsonConvert.convert<String>(json['refreshToken']);
  if (refreshToken != null) {
    loginBeanEntity.refreshToken = refreshToken;
  }
  final String? nickname = jsonConvert.convert<String>(json['nickname']);
  loginBeanEntity.nickname = nickname;

  final int? expiresTime = jsonConvert.convert<int>(json['expiresTime']);
  if (expiresTime != null) {
    loginBeanEntity.expiresTime = expiresTime;
  }
  return loginBeanEntity;
}

Map<String, dynamic> $LoginBeanEntityToJson(LoginBeanEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['userId'] = entity.userId;
  data['accessToken'] = entity.accessToken;
  data['refreshToken'] = entity.refreshToken;
  data['expiresTime'] = entity.expiresTime;
  data['nickname'] = entity.nickname;
  return data;
}
